package com.dayu.finecomm.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName: DeviceConfig
 * @Description:网关
 * @author: 戴卫国
 * @date: 2018年3月6日 下午2:49:43
 * 
 * @Copyright: 2018 dayu Inc. All rights reserved.
 */
public class DeviceConfig {

	public static boolean sh = true;

	public boolean enabled;

	/**
	 * @Fields name : 驱动名称
	 */
	public String name;

	/**
	 * @Fields name : 驱动类型
	 */
	public String type;

	/**
	 * @Fields name : 超时时间（秒）
	 */
	public int idle;

	/**
	 * @Fields name :多网卡的ip
	 */
	public String host;

	/**
	 * @Fields name : 端口
	 */
	public int port;

	/**
	 * @Fields name : 前缀
	 */
	public String prefix;

	/**
	 * @Fields name : 协议
	 */
	public List<String> protocols;

	/**
	 * @Fields name : 报文分发
	 */
	public List<DevicePusher> pushers;

	/**
	 * @Fields name : dsc参数
	 */
	public List<String> dscparams;

	/**
	 * @Fields name : Web代理服务器地址
	 */
	public String webproxy;

	/**
	 * @Fields name :刷新Iot RefreshToken
	 */
	public boolean refreshToken;

	public boolean opcUaEnabled;

	public String opcUaEndPoint;

	/**
	 * @Fields interval : 刷新时间间隔(毫秒)
	 */
	public int interval = 4000;

	public DeviceConfig() {

		host = "0.0.0.0";
		protocols = new ArrayList<>();
		pushers = new ArrayList<>();
		dscparams = new ArrayList<>();
	}

	public DeviceConfig(boolean enabled, int port, String prefix, List<String> protocols) {

		this();

		this.enabled = enabled;
		this.port = port;
		this.prefix = prefix;
		this.protocols = protocols;
	}

}
